package cn.z2huo.knowledge.basic.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * <p>
 *
 * @author z2huo
 */
@Getter
@RequiredArgsConstructor
enum ButtonEnum {

    ROLE_MANAGE_LIST("role_manage_list"),

    USER_MANAGE_LIST("user_manage_list"),

    ;

    private final String value;

    public static ButtonEnum fromValue(String value) {
        return Arrays.stream(ButtonEnum.values()).filter(x -> x.getValue().equals(value)).findFirst().orElse(null);
    }

}
